/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。
 * 
 * 欢迎到知启蒙网站（https://www.zhiqim.com）购买正版软件，知启蒙还提供许多开源框架和软件。
 * 
 * 1、本软件产品所有源代码受《中华人民共和国著作权法》和其他有关法律、法规的保护，其所有知识产权归湖南知启蒙科技有限公司所有；
 * 2、禁止复制和修改。不得复制修改、翻译或改编本软件所有源代码，或者基于本软件产品创作衍生作品；
 * 3、禁止进行逆向工程。不得对本软件的源代码进行逆向工程、反编译或试图以其他方式发现软件的源代码；
 * 4、个别授权：如需进行商业性的销售、复制、分发，包括但不限于软件销售、预装、捆绑等，必须获得知启蒙的书面授权和许可；
 * 5、保留权利：本注释未明示授权的其他一切权利仍归知启蒙所有，任何人使用其他权利时必须获得知启蒙的书面同意。
*/
package net.redxyz.open.api.dbo;

import java.io.Serializable;

import org.zhiqim.kernel.annotation.AnAlias;
import org.zhiqim.kernel.annotation.AnNew;
import org.zhiqim.kernel.json.Jsons;
import org.zhiqim.orm.annotation.*;

/**
 * API 日志 对应表《OPEN_API_LOG》
 */
@AnAlias("OpenApiLog")
@AnNew
@AnTable(table="OPEN_API_LOG", key="LOG_ID", type="InnoDB")
@AnIndex({@AnIndexValue(name="IX_CLIENT_ID", column="CLIENT_ID", unique=false),
          @AnIndexValue(name="IX_REQUEST_ID", column="REQUEST_ID", unique=false),
          @AnIndexValue(name="IX_API_METHOD", column="API_METHOD", unique=false),
          @AnIndexValue(name="IX_SELLER_NICK", column="SELLER_NICK", unique=false),
          @AnIndexValue(name="IX_REQ_DAY_DATE", column="REQ_DAY_DATE", unique=false),
          @AnIndexValue(name="IX_REQ_TIME", column="REQ_TIME", unique=false),
          @AnIndexValue(name="IX_REQ_ID", column="REQ_ID", unique=false),
          @AnIndexValue(name="IX_IS_SUCCESS", column="IS_SUCCESS", unique=false)})
public class OpenApiLog implements Serializable
{
    private static final long serialVersionUID = 1L;

    @AnTableField(column="LOG_ID", type="long", notNull=true)    private long logId;    //1.请求ID。
    @AnTableField(column="CLIENT_ID", type="long", notNull=true)    private long clientId;    //2.客户端ID
    @AnTableField(column="SELLER_NICK", type="string,128", notNull=false)    private String sellerNick;    //3.请求的昵称信息
    @AnTableField(column="API_METHOD", type="string,128", notNull=false)    private String apiMethod;    //4.请求的API名称
    @AnTableField(column="REQ_DAY_DATE", type="int", notNull=false)    private int reqDayDate;    //5.请求时间 yyyy-MM-dd
    @AnTableField(column="REQ_TIME", type="string,20", notNull=false)    private String reqTime;    //6.请求时间
    @AnTableField(column="RSP_TIME", type="string,20", notNull=false)    private String rspTime;    //7.响应时间
    @AnTableField(column="REQ_BODY", type="string,512000", notNull=false)    private String reqBody;    //8.请求体
    @AnTableField(column="LARGE_REQ_PATH", type="string,255", notNull=false)    private String largeReqPath;    //9.超长请求体文件保存位置
    @AnTableField(column="RSP_BODY", type="string,512000", notNull=false)    private String rspBody;    //10.响应内容，500 K
    @AnTableField(column="LARGE_RSP_PATH", type="string,255", notNull=false)    private String largeRspPath;    //11.超长相应体文件保存位置
    @AnTableField(column="REQUEST_ID", type="string,128", notNull=false)    private String requestId;    //12.淘宝请求ID,方便问跟踪
    @AnTableField(column="REQ_ID", type="string,128", notNull=true)    private String reqId;    //13.系统请求ID
    @AnTableField(column="IS_SUCCESS", type="boolean", notNull=true)    private boolean isSuccess;    //14.本地请求是否成功，包括，内部API调用成功
    @AnTableField(column="IS_TB_SUCCESS", type="boolean", notNull=true)    private boolean isTbSuccess;    //15.淘宝是否请求成功
    @AnTableField(column="IS_RSP_SUCCESS", type="boolean", notNull=true)    private boolean isRspSuccess;    //16.是否响应客户端成功
    @AnTableField(column="EXCEPTION_MSG", type="string,2000", notNull=false)    private String exceptionMsg;    //17.异常内容。方便定位问题

    public String toString()
    {
        return Jsons.toString(this);
    }

    public long getLogId()
    {
        return logId;
    }

    public void setLogId(long logId)
    {
        this.logId = logId;
    }

    public long getClientId()
    {
        return clientId;
    }

    public void setClientId(long clientId)
    {
        this.clientId = clientId;
    }

    public String getSellerNick()
    {
        return sellerNick;
    }

    public void setSellerNick(String sellerNick)
    {
        this.sellerNick = sellerNick;
    }

    public String getApiMethod()
    {
        return apiMethod;
    }

    public void setApiMethod(String apiMethod)
    {
        this.apiMethod = apiMethod;
    }

    public int getReqDayDate()
    {
        return reqDayDate;
    }

    public void setReqDayDate(int reqDayDate)
    {
        this.reqDayDate = reqDayDate;
    }

    public String getReqTime()
    {
        return reqTime;
    }

    public void setReqTime(String reqTime)
    {
        this.reqTime = reqTime;
    }

    public String getRspTime()
    {
        return rspTime;
    }

    public void setRspTime(String rspTime)
    {
        this.rspTime = rspTime;
    }

    public String getReqBody()
    {
        return reqBody;
    }

    public void setReqBody(String reqBody)
    {
        this.reqBody = reqBody;
    }

    public String getLargeReqPath()
    {
        return largeReqPath;
    }

    public void setLargeReqPath(String largeReqPath)
    {
        this.largeReqPath = largeReqPath;
    }

    public String getRspBody()
    {
        return rspBody;
    }

    public void setRspBody(String rspBody)
    {
        this.rspBody = rspBody;
    }

    public String getLargeRspPath()
    {
        return largeRspPath;
    }

    public void setLargeRspPath(String largeRspPath)
    {
        this.largeRspPath = largeRspPath;
    }

    public String getRequestId()
    {
        return requestId;
    }

    public void setRequestId(String requestId)
    {
        this.requestId = requestId;
    }

    public String getReqId()
    {
        return reqId;
    }

    public void setReqId(String reqId)
    {
        this.reqId = reqId;
    }

    public boolean isSuccess()
    {
        return isSuccess;
    }

    public void setSuccess(boolean isSuccess)
    {
        this.isSuccess = isSuccess;
    }

    public boolean isTbSuccess()
    {
        return isTbSuccess;
    }

    public void setTbSuccess(boolean isTbSuccess)
    {
        this.isTbSuccess = isTbSuccess;
    }

    public boolean isRspSuccess()
    {
        return isRspSuccess;
    }

    public void setRspSuccess(boolean isRspSuccess)
    {
        this.isRspSuccess = isRspSuccess;
    }

    public String getExceptionMsg()
    {
        return exceptionMsg;
    }

    public void setExceptionMsg(String exceptionMsg)
    {
        this.exceptionMsg = exceptionMsg;
    }

}
